package com.wkbb.basic.thread;

import com.wkbb.basic.service.XmppService;
import lombok.extern.slf4j.Slf4j;

import java.util.Date;

/**
 * @author yangdaofang
 * 创建时间：2020-07-15 14:33
 */
@Slf4j
public class XmppUpdatePersonByDateTask implements Runnable{

    private Long orgId;

    private Date date;

    private XmppService xmppService;

    private int roleType;

    public XmppUpdatePersonByDateTask(Long orgId,Date date,XmppService xmppService,int roleType) {
        this.orgId = orgId;
        this.date = date;
        this.xmppService = xmppService;
        this.roleType = roleType;
    }

    public XmppUpdatePersonByDateTask() {

    }

    @Override
    public void run() {
        log.info("----------XmppUpdatePersonByDateTask----------orgId:{},date:{},roleType{}", orgId, date,roleType);
        try {
            xmppService .xmppUpdatePersonByDate( orgId, date,roleType);
        } catch (Exception e) {
            log.error("----------XmppUpdatePersonByDateTask----------orgId:{},date:{},roleType:{}",e);
        }
    }
}
